import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/MyHome.vue'

Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    redirect:'/home'
  },
  {
    path: '/home',
    name: 'home',
    component: Home
  },
  {
    path: '/user',
    name: 'user',
    component: () => import('../views/MyUser.vue')
  },
  {
    path:'/detail/:id',
    component:()=>import('../views/DetailPage.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
